/**********************************************************************
  The MIT License (MIT)
  Copyright (c) 2012 sunriseyuen

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
  THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ***********************************************************************/

#define _DEF_CCY_CODE
#define _ZZDEBUG
#define _PROJ_DC

#region Using directives

using System;
using System.Text;
using System.IO;
using System.Xml;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Reflection;
using System.Web;
using System.Web.UI;

using Muki.Framework;
using Muki.Framework.UI;
using Muki.Framework.Business;
using Muki.Framework.Util;
using Muki.UserDefine;
using Muki.Entity;
using Dot.StreamObject;

using Dot.Tmpl;
using Dot.Tmpl.Parser;

#endregion

namespace Muki.UserPanel
{

	public class UID02204BV
	{
		public UID02204BV()
		{
		}

		public void setValue()
		{

				_lnk_RW_NO=ZZGeneral.XRequest("lnk_RW_NO");
				if (ZZGeneral.XRequest("lnk_UID_CODE_DAT")!="")
				{
					_Wxf = new Wxf();
					_Wxf.Parser(System.Web.HttpUtility.UrlDecode(ZZGeneral.XRequest("lnk_UID_CODE_DAT")));
					_Wxf.Open();

					ZZTrace.WriteToFile(this.APP_PATH+"\\temp\\UID02204B2.js",_Wxf.ToString());
					_lnk_MODE="B";
				}

					_UID02204BEntity.ODTP_CODE = _Convert.ToString(objVARIABLE_ODTP_CODE.Text);

					_UID02204BEntity.VO_NO = _Convert.ToString(objVORDTLM_VO_NO.Text);

					_UID02204BEntity.VO_DT = _Convert.ToString(objVORDTLM_VO_DT.Text);
					if (_STATUS_DATA["IsPostBack"]=="")
					{
						if (ZZGeneral.XRequest("lnk_VORDTLM_VO_DT")!="")
						{
							_UID02204BEntity.VO_DT = ZZGeneral.XRequest("lnk_VORDTLM_VO_DT");
						}
					}

					_UID02204BEntity.ODTP_STATUS = _Convert.ToString(objVARIABLE_ODTP_STATUS.Text);

					_UID02204BEntity.VO_DATE = _Convert.ToDateTime(objVARIABLE_VO_DATE.Text);

					_UID02204BEntity.COMP_CODE = _Convert.ToString(objVARIABLE_COMP_CODE.Text);

					_UID02204BEntity.REVERSE_BIT = _Convert.ToBoolean(objVARIABLE_REVERSE_BIT.Text);

					_UID02204BEntity.REFX_NO = _Convert.ToString(objVARIABLE_REFX_NO.Text);

					_UID02204BEntity.ACC_CODE = _Convert.ToString(objVORDTLM_ACC_CODE.Text);

					_UID02204BEntity.ACC_NAME01 = _Convert.ToString(objVARIABLE_ACC_NAME01.Text);

					_UID02204BEntity.CCY_CODE = _Convert.ToString(objVORDTLM_CCY_CODE.Text);

					_UID02204BEntity.XCHG_RATE = _Convert.ToDecimal(objVORDTLM_XCHG_RATE.Text);

					_UID02204BEntity.SERIAL_NO = _Convert.ToInt(objVORDTLM_SERIAL_NO.Text);

					_UID02204BEntity.SIGN_CODE = _Convert.ToString(objVORDTLM_SIGN_CODE.Text);

					_UID02204BEntity.VO_CCY_AMT = _Convert.ToDecimal(objVARIABLE_VO_CCY_AMT.Text);

					_UID02204BEntity.VO_DET_AMT = _Convert.ToDecimal(objVARIABLE_VO_DET_AMT.Text);

					_UID02204BEntity.VO_DOC_NAME01 = _Convert.ToString(objVORDTLM_VO_DOC_NAME01.Text);

					_UID02204BEntity.VO_RMKS = _Convert.ToString(objVORDTLM_VO_RMKS.Text);

					_UID02204BEntity.REQ_QTY = _Convert.ToDecimal(objVORDTLM_REQ_QTY.Text);

					_UID02204BEntity.UOM_CODE = _Convert.ToString(objVORDTLM_UOM_CODE.Text);

					_UID02204BEntity.DOC_NO = _Convert.ToString(objVORDTLM_DOC_NO.Text);

					_UID02204BEntity.DOC_TP_CODE = _Convert.ToString(objVORDTLM_DOC_TP_CODE.Text);

					_UID02204BEntity.PAY_CODE = _Convert.ToString(objVORDTLM_PAY_CODE.Text);

					_UID02204BEntity.DOC_REF_NO = _Convert.ToString(objVORDTLM_DOC_REF_NO.Text);

					_UID02204BEntity.DOC_REQ_DATE = _Convert.ToDateTime(objVORDTLM_DOC_REQ_DATE.Text);

					_UID02204BEntity.DOC_DUE_DATE = _Convert.ToDateTime(objVORDTLM_DOC_DUE_DATE.Text);

					_UID02204BEntity.VO_DR_DET_AMT = _Convert.ToDecimal(objVORDTLM_VO_DR_DET_AMT.Text);

					_UID02204BEntity.VO_DR_CCY_AMT = _Convert.ToDecimal(objVORDTLM_VO_DR_CCY_AMT.Text);

					_UID02204BEntity.VO_CR_DET_AMT = _Convert.ToDecimal(objVORDTLM_VO_CR_DET_AMT.Text);

					_UID02204BEntity.VO_CR_CCY_AMT = _Convert.ToDecimal(objVORDTLM_VO_CR_CCY_AMT.Text);

					_UID02204BEntity.DR_DET_AMT = _Convert.ToDecimal(objVARIABLE_DR_DET_AMT.Text);

					_UID02204BEntity.CR_DET_AMT = _Convert.ToDecimal(objVARIABLE_CR_DET_AMT.Text);

					_UID02204BEntity.DIFF_DET_AMT = _Convert.ToDecimal(objVARIABLE_DIFF_DET_AMT.Text);

		}

		public void getValue()
		{
					_STATUS_DATA["UID02204B","PK_VO_DT"]=_Convert.ToString(_UID02204BEntity.VO_DT);

					objVARIABLE_ODTP_CODE.Text=_Convert.ToString(_UID02204BEntity.ODTP_CODE);
					objVORDTLM_VO_NO.Text=_Convert.ToString(_UID02204BEntity.VO_NO);
					objVORDTLM_VO_DT.Text=_Convert.ToString(_UID02204BEntity.VO_DT);
					objVARIABLE_ODTP_STATUS.Text=_Convert.ToString(_UID02204BEntity.ODTP_STATUS);
					objVARIABLE_VO_DATE.Text=_Convert.ToString(_UID02204BEntity.VO_DATE);
					objVARIABLE_COMP_CODE.Text=_Convert.ToString(_UID02204BEntity.COMP_CODE);
					objVARIABLE_REVERSE_BIT.Text=_Convert.ToString(_UID02204BEntity.REVERSE_BIT);
					objVARIABLE_REFX_NO.Text=_Convert.ToString(_UID02204BEntity.REFX_NO);
					objVORDTLM_ACC_CODE.Text=_Convert.ToString(_UID02204BEntity.ACC_CODE);
					objVARIABLE_ACC_NAME01.Text=_Convert.ToString(_UID02204BEntity.ACC_NAME01);
					objVORDTLM_CCY_CODE.Text=_Convert.ToString(_UID02204BEntity.CCY_CODE);
					objVORDTLM_XCHG_RATE.Text=_Convert.ToString(_UID02204BEntity.XCHG_RATE);
					objVORDTLM_SERIAL_NO.Text=_Convert.ToString(_UID02204BEntity.SERIAL_NO);
					objVORDTLM_SIGN_CODE.Text=_Convert.ToString(_UID02204BEntity.SIGN_CODE);
					objVARIABLE_VO_CCY_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_CCY_AMT);
					objVARIABLE_VO_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_DET_AMT);
					objVORDTLM_VO_DOC_NAME01.Text=_Convert.ToString(_UID02204BEntity.VO_DOC_NAME01);
					objVORDTLM_VO_RMKS.Text=_Convert.ToString(_UID02204BEntity.VO_RMKS);
					objVORDTLM_REQ_QTY.Text=_Convert.ToString(_UID02204BEntity.REQ_QTY);
					objVORDTLM_UOM_CODE.Text=_Convert.ToString(_UID02204BEntity.UOM_CODE);
					objVORDTLM_DOC_NO.Text=_Convert.ToString(_UID02204BEntity.DOC_NO);
					objVORDTLM_DOC_TP_CODE.Text=_Convert.ToString(_UID02204BEntity.DOC_TP_CODE);
					objVORDTLM_PAY_CODE.Text=_Convert.ToString(_UID02204BEntity.PAY_CODE);
					objVORDTLM_DOC_REF_NO.Text=_Convert.ToString(_UID02204BEntity.DOC_REF_NO);
					objVORDTLM_DOC_REQ_DATE.Text=_Convert.ToString(_UID02204BEntity.DOC_REQ_DATE);
					objVORDTLM_DOC_DUE_DATE.Text=_Convert.ToString(_UID02204BEntity.DOC_DUE_DATE);
					objVORDTLM_VO_DR_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_DR_DET_AMT);
					objVORDTLM_VO_DR_CCY_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_DR_CCY_AMT);
					objVORDTLM_VO_CR_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_CR_DET_AMT);
					objVORDTLM_VO_CR_CCY_AMT.Text=_Convert.ToString(_UID02204BEntity.VO_CR_CCY_AMT);
					objVARIABLE_DR_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.DR_DET_AMT);
					objVARIABLE_CR_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.CR_DET_AMT);
					objVARIABLE_DIFF_DET_AMT.Text=_Convert.ToString(_UID02204BEntity.DIFF_DET_AMT);

				objVORDTLM_USECURITY_CODE1.Text=_UID02204BEntity.USECURITY_CODE1;
							objVORDTLM_USECURITY_CODE2.Text=_UID02204BEntity.USECURITY_CODE2;
							objVORDTLM_USECURITY_CODE3.Text=_UID02204BEntity.USECURITY_CODE3;
							objVORDTLM_USECURITY_CODE4.Text=_UID02204BEntity.USECURITY_CODE4;
							objVORDTLM_USECURITY_CODE5.Text=_UID02204BEntity.USECURITY_CODE5;
							objVORDTLM_USECURITY_CODE6.Text=_UID02204BEntity.USECURITY_CODE6;
			
			objVORDTLM_USECURITY_RIGHT.Text = _UID02204BEntity.USECURITY_RIGHT.ToString();
			objVORDTLM_UZADD_DATE.Text      = _UID02204BEntity.UZADD_DATE;
			objVORDTLM_UZADD_USER.Text      = _UID02204BEntity.UZADD_USER;
			objVORDTLM_UZCHG_DATE.Text      = _UID02204BEntity.UZCHG_DATE;
			objVORDTLM_UZCHG_USER.Text      = _UID02204BEntity.UZCHG_USER;
		}

		public void OnInit(HttpContext  objHttpContext)		
		{

			this.UID_CODE = "UID02204B";
			this.DbName = ZZGeneral.DbName();

				_STATUS_DATA.UID_CODE="UID02204B";
			_STATUS_DATA.OnInit(objHttpContext);

			_STATUS_DATA["lnk_UID_CODE"] = "UID02204B";
			_STATUS_DATA["UID02204B","USQL_CODE"] = "QID02204B";

			this.ZZEventStatus      = _STATUS_DATA["ZZEventStatus"];
			this.ZZEventMode        = _STATUS_DATA["ZZEventMode"];
			this.ZZEventArgs        = _STATUS_DATA["ZZEventArgs"];
			this.ZZEventOpts        = _STATUS_DATA["ZZEventOpts"];
			this.ZZLOGON_SSD        = _STATUS_DATA["ZZLOGON_SSD"];
			this.ZZLOGON_LANG       = _STATUS_DATA["ZZLOGON_LANG"];
			this.ZZMODEL_DATA       = _STATUS_DATA["ZZMODEL_DATA"];

			this.ZZVIEW_STATUS_CODE = _STATUS_DATA["UID02204B","ZZVIEW_STATUS_CODE"];
			this.ZZVIEW_MODE_CODE   = _STATUS_DATA["UID02204B","ZZVIEW_MODE_CODE"];

			ZZTrace.Debug(ZFILE_NAME,"...123456...---"+this.ZZLOGON_SSD);
			ZZTrace.Debug(ZFILE_NAME,".ZZMODEL_DATA-"+this.ZZMODEL_DATA);
			ZZTrace.Debug(ZFILE_NAME,".ZZVIEW_MODE_CODE-"+this.ZZVIEW_MODE_CODE);
			ZZTrace.Debug(ZFILE_NAME,".ZZVIEW_STATUS_CODE-"+this.ZZVIEW_STATUS_CODE);

			this.Trans = new StreamContext(this.DbName);

			XLiveManagement oXLiveManagement=XLiveManagement.getInstance();
			oXLiveManagement.DbName=this.DbName;
			this.ZZLOGON_ID=oXLiveManagement[this.ZZLOGON_SSD].getValue("LOGON_ID");

			if (this.ZZLOGON_LANG=="")
			{
				this.ZZLOGON_LANG=oXLiveManagement[this.ZZLOGON_SSD].getValue("LOGON_LANG");
			}

			ZZTrace.Debug(ZFILE_NAME,"...123456...---"+this.ZZLOGON_LANG);

			_STATUS_DATA["ZZLOGON_LANG"] = this.ZZLOGON_LANG;

			_Convert.ZZLOGON_SSD = this.ZZLOGON_SSD;
			_Convert.Trans       = this.Trans;

			_Captions             = new ZZCaptions();
			_Captions.DbName      = this.DbName;
			_Captions.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			_Captions.ZZLOGON_SSD = this.ZZLOGON_SSD;

			_DocsPermission.Trans = this.Trans;

			dbTab objdbTab       = new dbTab();
			objdbTab.UID_CODE    = this.UID_CODE;
			objdbTab.Trans       = this.Trans;
			objdbTab.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			objdbTab.ZZLOGON_SSD = this.ZZLOGON_SSD;
			objdbTab.Create();

			objWebPanels=objdbTab.Panels;

			oWindow.AddPanels(objWebPanels);
			oWindow.Trans       = this.Trans;
			oWindow.ZZLOGON_SSD = this.ZZLOGON_SSD;
			oWindow.ZZLOGON_LANG  = this.ZZLOGON_LANG;

			Muki.Framework.ZZSetting oZZSetting = new Muki.Framework.ZZSetting();
			oZZSetting.Trans=this.Trans;

#region Quick Search

			_WebLookup.UGET_CODE   = "QDD02204B";
			_WebLookup.Trans       = this.Trans;
			_WebLookup.DbName      = this.DbName;
			_WebLookup.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			_WebLookup.ZZLOGON_SSD = this.ZZLOGON_SSD;

				oWindow.AddLookUp(_WebLookup);

			XOption objXOption     = new XOption();
			objXOption.UID_CODE    = this.UID_CODE;
			objXOption.Trans       = this.Trans;

			XDepend objXDepend     = new XDepend();
			objXDepend.UID_CODE    = this.UID_CODE;
			objXDepend.Trans       = this.Trans;
			objXDepend.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			objXDepend.ZZLOGON_SSD = this.ZZLOGON_SSD;

			ZZCDF _ZZCDF      = new ZZCDF();
			_ZZCDF.UID_CODE   = this.UID_CODE;
			_ZZCDF.Trans      = this.Trans;

#endregion

			oXForm             = new XForm();
			oXForm.UID_CODE    = this.UID_CODE;
			oXForm.DbName      = this.DbName;
			oXForm.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			oXForm.ZZLOGON_SSD = this.ZZLOGON_SSD;
			oXForm.MODEL_DATA = this.ZZMODEL_DATA;

			//oXForm.Trans     = this.Trans;

#region XForm element

#region VARIABLE_ODTP_CODE
				objVARIABLE_ODTP_CODE.Name              = "Txt_VARIABLE_ODTP_CODE";
				objVARIABLE_ODTP_CODE.TABLE_COLUMN_NAME = "VARIABLE_ODTP_CODE";

				objVARIABLE_ODTP_CODE.OnBlurEvents = "";
				objVARIABLE_ODTP_CODE.Length       = 10;
				objVARIABLE_ODTP_CODE.Height       = 0;
				objVARIABLE_ODTP_CODE.COLUMN_SCALE = 0;
				objVARIABLE_ODTP_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_ODTP_CODE.Compulsory   = false;
				objVARIABLE_ODTP_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_ODTP_CODE");
				objVARIABLE_ODTP_CODE.COLSPAN      = 1;
				objVARIABLE_ODTP_CODE.ROWSPAN      = 1;
				objVARIABLE_ODTP_CODE.Index        = 1010;
				objVARIABLE_ODTP_CODE.NEW_LINE     = true;
				objVARIABLE_ODTP_CODE.NEW_CELL     = true;
				objVARIABLE_ODTP_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_ODTP_CODE);
				oWindow.Components.Add(objVARIABLE_ODTP_CODE);

					objVARIABLE_ODTP_CODE.Browser        = objVARIABLE_ODTP_CODEBrw;
					objVARIABLE_ODTP_CODEBrw.UGET_CODE   = "ODTP_CODE";
					objVARIABLE_ODTP_CODEBrw.Data_Viewer = "";
					objVARIABLE_ODTP_CODEBrw.ACTIVE_FIELD ="ZUODTPTM.";

						objVARIABLE_ODTP_CODE.OnBlurEvents="RefreshData('ODTP_CODE','XREF','Txt_VARIABLE_ODTP_CODE');";
					objVARIABLE_ODTP_CODE.OnBlurEvents="RefreshData('ODTP_CODE','VIEW','Txt_VARIABLE_ODTP_CODE');";

					objVARIABLE_ODTP_CODE.UGET_CODE="ODTP_CODE";

#endregion //VARIABLE_ODTP_CODE

#region VORDTLM_VO_NO
				objVORDTLM_VO_NO.Name              = "Txt_VORDTLM_VO_NO";
				objVORDTLM_VO_NO.TABLE_COLUMN_NAME = "VORDTLM_VO_NO";

				objVORDTLM_VO_NO.OnBlurEvents = "";
				objVORDTLM_VO_NO.Length       = 12;
				objVORDTLM_VO_NO.Height       = 0;
				objVORDTLM_VO_NO.COLUMN_SCALE = 0;
				objVORDTLM_VO_NO.STATUS_CODE  = "";
				objVORDTLM_VO_NO.Compulsory   = true;
				objVORDTLM_VO_NO.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_NO");
				objVORDTLM_VO_NO.COLSPAN      = 1;
				objVORDTLM_VO_NO.ROWSPAN      = 1;
				objVORDTLM_VO_NO.Index        = 1020;
				objVORDTLM_VO_NO.NEW_LINE     = false;
				objVORDTLM_VO_NO.NEW_CELL     = true;
				objVORDTLM_VO_NO.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_NO);
				oWindow.Components.Add(objVORDTLM_VO_NO);

					objVORDTLM_VO_NO.Browser        = objVORDTLM_VO_NOBrw;
					objVORDTLM_VO_NOBrw.UGET_CODE   = "UGET0078A";
					objVORDTLM_VO_NOBrw.Data_Viewer = "";
					objVORDTLM_VO_NOBrw.ACTIVE_FIELD ="VORHDTM.VO_NO";

						objVORDTLM_VO_NO.OnBlurEvents="RefreshData('UGET0078A','XREF','Txt_VORDTLM_VO_NO');";
					objVORDTLM_VO_NO.OnBlurEvents="RefreshData('UGET0100A','VIEW','Txt_VORDTLM_VO_NO');";

					objVORDTLM_VO_NO.UGET_CODE="UGET0078A";

#endregion //VORDTLM_VO_NO

#region VORDTLM_VO_DT
				objVORDTLM_VO_DT.Name              = "Txt_VORDTLM_VO_DT";
				objVORDTLM_VO_DT.TABLE_COLUMN_NAME = "VORDTLM_VO_DT";

				objVORDTLM_VO_DT.OnBlurEvents = "";
				objVORDTLM_VO_DT.Length       = 12;
				objVORDTLM_VO_DT.Height       = 0;
				objVORDTLM_VO_DT.COLUMN_SCALE = 0;
				objVORDTLM_VO_DT.STATUS_CODE  = "HIDDEN";
				objVORDTLM_VO_DT.Compulsory   = false;
				objVORDTLM_VO_DT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DT");
				objVORDTLM_VO_DT.COLSPAN      = 1;
				objVORDTLM_VO_DT.ROWSPAN      = 1;
				objVORDTLM_VO_DT.Index        = 1030;
				objVORDTLM_VO_DT.NEW_LINE     = false;
				objVORDTLM_VO_DT.NEW_CELL     = true;
				objVORDTLM_VO_DT.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_DT);
				oWindow.Components.Add(objVORDTLM_VO_DT);

#endregion //VORDTLM_VO_DT

#region VARIABLE_ODTP_STATUS
				objVARIABLE_ODTP_STATUS.Name              = "Txt_VARIABLE_ODTP_STATUS";
				objVARIABLE_ODTP_STATUS.TABLE_COLUMN_NAME = "VARIABLE_ODTP_STATUS";

				objVARIABLE_ODTP_STATUS.OnBlurEvents = "";
				objVARIABLE_ODTP_STATUS.Length       = 8;
				objVARIABLE_ODTP_STATUS.Height       = 0;
				objVARIABLE_ODTP_STATUS.COLUMN_SCALE = 0;
				objVARIABLE_ODTP_STATUS.STATUS_CODE  = "";
				objVARIABLE_ODTP_STATUS.Compulsory   = false;
				objVARIABLE_ODTP_STATUS.Caption      = _Captions.Caption(this.UID_CODE,"lbl_ODTP_STATUS");
				objVARIABLE_ODTP_STATUS.COLSPAN      = 1;
				objVARIABLE_ODTP_STATUS.ROWSPAN      = 1;
				objVARIABLE_ODTP_STATUS.Index        = 1040;
				objVARIABLE_ODTP_STATUS.NEW_LINE     = false;
				objVARIABLE_ODTP_STATUS.NEW_CELL     = true;
				objVARIABLE_ODTP_STATUS.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_ODTP_STATUS);
				oWindow.Components.Add(objVARIABLE_ODTP_STATUS);

#endregion //VARIABLE_ODTP_STATUS

#region VARIABLE_VO_DATE
				objVARIABLE_VO_DATE.Name              = "Txt_VARIABLE_VO_DATE";
				objVARIABLE_VO_DATE.TABLE_COLUMN_NAME = "VARIABLE_VO_DATE";

				objVARIABLE_VO_DATE.OnBlurEvents = "";
				objVARIABLE_VO_DATE.Length       = 10;
				objVARIABLE_VO_DATE.Height       = 0;
				objVARIABLE_VO_DATE.COLUMN_SCALE = 0;
				objVARIABLE_VO_DATE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_VO_DATE.Compulsory   = true;
				objVARIABLE_VO_DATE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DATE");
				objVARIABLE_VO_DATE.COLSPAN      = 1;
				objVARIABLE_VO_DATE.ROWSPAN      = 1;
				objVARIABLE_VO_DATE.Index        = 1050;
				objVARIABLE_VO_DATE.NEW_LINE     = true;
				objVARIABLE_VO_DATE.NEW_CELL     = true;
				objVARIABLE_VO_DATE.LINE_REVEAL  = false;

					objVARIABLE_VO_DATE.Title=_Captions.Caption("lbl_Date_Column_Title");

				oXForm.AddObject(objVARIABLE_VO_DATE);
				oWindow.Components.Add(objVARIABLE_VO_DATE);

#endregion //VARIABLE_VO_DATE

#region VARIABLE_COMP_CODE
				objVARIABLE_COMP_CODE.Name              = "Txt_VARIABLE_COMP_CODE";
				objVARIABLE_COMP_CODE.TABLE_COLUMN_NAME = "VARIABLE_COMP_CODE";

				objVARIABLE_COMP_CODE.OnBlurEvents = "";
				objVARIABLE_COMP_CODE.Length       = 8;
				objVARIABLE_COMP_CODE.Height       = 0;
				objVARIABLE_COMP_CODE.COLUMN_SCALE = 0;
				objVARIABLE_COMP_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_COMP_CODE.Compulsory   = false;
				objVARIABLE_COMP_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_COMP_CODE");
				objVARIABLE_COMP_CODE.COLSPAN      = 1;
				objVARIABLE_COMP_CODE.ROWSPAN      = 1;
				objVARIABLE_COMP_CODE.Index        = 1060;
				objVARIABLE_COMP_CODE.NEW_LINE     = false;
				objVARIABLE_COMP_CODE.NEW_CELL     = true;
				objVARIABLE_COMP_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_COMP_CODE);
				oWindow.Components.Add(objVARIABLE_COMP_CODE);

#endregion //VARIABLE_COMP_CODE

#region VARIABLE_REVERSE_BIT
				objVARIABLE_REVERSE_BIT.Name              = "Txt_VARIABLE_REVERSE_BIT";
				objVARIABLE_REVERSE_BIT.TABLE_COLUMN_NAME = "VARIABLE_REVERSE_BIT";

				objVARIABLE_REVERSE_BIT.OnBlurEvents = "";
				objVARIABLE_REVERSE_BIT.Length       = 10;
				objVARIABLE_REVERSE_BIT.Height       = 0;
				objVARIABLE_REVERSE_BIT.COLUMN_SCALE = 0;
				objVARIABLE_REVERSE_BIT.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_REVERSE_BIT.Compulsory   = false;
				objVARIABLE_REVERSE_BIT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_REVERSE_BIT");
				objVARIABLE_REVERSE_BIT.COLSPAN      = 1;
				objVARIABLE_REVERSE_BIT.ROWSPAN      = 1;
				objVARIABLE_REVERSE_BIT.Index        = 1070;
				objVARIABLE_REVERSE_BIT.NEW_LINE     = false;
				objVARIABLE_REVERSE_BIT.NEW_CELL     = true;
				objVARIABLE_REVERSE_BIT.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_REVERSE_BIT);
				oWindow.Components.Add(objVARIABLE_REVERSE_BIT);

#endregion //VARIABLE_REVERSE_BIT

#region VARIABLE_REFX_NO
				objVARIABLE_REFX_NO.Name              = "Txt_VARIABLE_REFX_NO";
				objVARIABLE_REFX_NO.TABLE_COLUMN_NAME = "VARIABLE_REFX_NO";

				objVARIABLE_REFX_NO.OnBlurEvents = "";
				objVARIABLE_REFX_NO.Length       = 15;
				objVARIABLE_REFX_NO.Height       = 0;
				objVARIABLE_REFX_NO.COLUMN_SCALE = 0;
				objVARIABLE_REFX_NO.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_REFX_NO.Compulsory   = false;
				objVARIABLE_REFX_NO.Caption      = _Captions.Caption(this.UID_CODE,"lbl_REFX_NO");
				objVARIABLE_REFX_NO.COLSPAN      = 1;
				objVARIABLE_REFX_NO.ROWSPAN      = 1;
				objVARIABLE_REFX_NO.Index        = 1080;
				objVARIABLE_REFX_NO.NEW_LINE     = true;
				objVARIABLE_REFX_NO.NEW_CELL     = true;
				objVARIABLE_REFX_NO.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_REFX_NO);
				oWindow.Components.Add(objVARIABLE_REFX_NO);

#endregion //VARIABLE_REFX_NO

#region VORDTLM_ACC_CODE
				objVORDTLM_ACC_CODE.Name              = "Txt_VORDTLM_ACC_CODE";
				objVORDTLM_ACC_CODE.TABLE_COLUMN_NAME = "VORDTLM_ACC_CODE";

				objVORDTLM_ACC_CODE.OnBlurEvents = "";
				objVORDTLM_ACC_CODE.Length       = 18;
				objVORDTLM_ACC_CODE.Height       = 0;
				objVORDTLM_ACC_CODE.COLUMN_SCALE = 0;
				objVORDTLM_ACC_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_ACC_CODE.Compulsory   = true;
				objVORDTLM_ACC_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_ACC_CODE");
				objVORDTLM_ACC_CODE.COLSPAN      = 1;
				objVORDTLM_ACC_CODE.ROWSPAN      = 1;
				objVORDTLM_ACC_CODE.Index        = 1090;
				objVORDTLM_ACC_CODE.NEW_LINE     = true;
				objVORDTLM_ACC_CODE.NEW_CELL     = true;
				objVORDTLM_ACC_CODE.LINE_REVEAL  = true;

				oXForm.AddObject(objVORDTLM_ACC_CODE);
				oWindow.Components.Add(objVORDTLM_ACC_CODE);

					objVORDTLM_ACC_CODE.Browser        = objVORDTLM_ACC_CODEBrw;
					objVORDTLM_ACC_CODEBrw.UGET_CODE   = "UGET0098A";
					objVORDTLM_ACC_CODEBrw.Data_Viewer = "";
					objVORDTLM_ACC_CODEBrw.ACTIVE_FIELD ="ACCDTBM.ACC_CODE";

						objVORDTLM_ACC_CODE.OnBlurEvents="RefreshData('UGET0098A','XREF','Txt_VORDTLM_ACC_CODE');";
					objVORDTLM_ACC_CODE.OnBlurEvents="RefreshData('UGET0077A','VIEW','Txt_VORDTLM_ACC_CODE');";

					objVORDTLM_ACC_CODE.UGET_CODE="UGET0098A";

#endregion //VORDTLM_ACC_CODE

#region VARIABLE_ACC_NAME01
				objVARIABLE_ACC_NAME01.Name              = "Txt_VARIABLE_ACC_NAME01";
				objVARIABLE_ACC_NAME01.TABLE_COLUMN_NAME = "VARIABLE_ACC_NAME01";

				objVARIABLE_ACC_NAME01.OnBlurEvents = "";
				objVARIABLE_ACC_NAME01.Length       = 40;
				objVARIABLE_ACC_NAME01.Height       = 0;
				objVARIABLE_ACC_NAME01.COLUMN_SCALE = 0;
				objVARIABLE_ACC_NAME01.STATUS_CODE  = "";
				objVARIABLE_ACC_NAME01.Compulsory   = false;
				objVARIABLE_ACC_NAME01.Caption      = _Captions.Caption(this.UID_CODE,"lbl_ACC_NAME01");
				objVARIABLE_ACC_NAME01.COLSPAN      = 4;
				objVARIABLE_ACC_NAME01.ROWSPAN      = 1;
				objVARIABLE_ACC_NAME01.Index        = 1100;
				objVARIABLE_ACC_NAME01.NEW_LINE     = false;
				objVARIABLE_ACC_NAME01.NEW_CELL     = true;
				objVARIABLE_ACC_NAME01.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_ACC_NAME01);
				oWindow.Components.Add(objVARIABLE_ACC_NAME01);

#endregion //VARIABLE_ACC_NAME01

#region VORDTLM_CCY_CODE
				objVORDTLM_CCY_CODE.Name              = "Txt_VORDTLM_CCY_CODE";
				objVORDTLM_CCY_CODE.TABLE_COLUMN_NAME = "VORDTLM_CCY_CODE";

				objVORDTLM_CCY_CODE.OnBlurEvents = "";
				objVORDTLM_CCY_CODE.Length       = 3;
				objVORDTLM_CCY_CODE.Height       = 0;
				objVORDTLM_CCY_CODE.COLUMN_SCALE = 0;
				objVORDTLM_CCY_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_CCY_CODE.Compulsory   = true;
				objVORDTLM_CCY_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_CCY_CODE");
				objVORDTLM_CCY_CODE.COLSPAN      = 1;
				objVORDTLM_CCY_CODE.ROWSPAN      = 1;
				objVORDTLM_CCY_CODE.Index        = 1110;
				objVORDTLM_CCY_CODE.NEW_LINE     = true;
				objVORDTLM_CCY_CODE.NEW_CELL     = true;
				objVORDTLM_CCY_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_CCY_CODE);
				oWindow.Components.Add(objVORDTLM_CCY_CODE);

					objVORDTLM_CCY_CODE.Browser        = objVORDTLM_CCY_CODEBrw;
					objVORDTLM_CCY_CODEBrw.UGET_CODE   = "UGET0096A";
					objVORDTLM_CCY_CODEBrw.Data_Viewer = "";
					objVORDTLM_CCY_CODEBrw.ACTIVE_FIELD ="CCYRTBM.CCY_CODE";

					objVORDTLM_CCY_CODE.OnBlurEvents="RefreshData('UGET0096A','XREF','Txt_VORDTLM_CCY_CODE');";

					objVORDTLM_CCY_CODE.UGET_CODE="UGET0096A";

#endregion //VORDTLM_CCY_CODE

#region VORDTLM_XCHG_RATE
				objVORDTLM_XCHG_RATE.Name              = "Txt_VORDTLM_XCHG_RATE";
				objVORDTLM_XCHG_RATE.TABLE_COLUMN_NAME = "VORDTLM_XCHG_RATE";

				objVORDTLM_XCHG_RATE.OnBlurEvents = "";
				objVORDTLM_XCHG_RATE.Length       = 18;
				objVORDTLM_XCHG_RATE.Height       = 0;
				objVORDTLM_XCHG_RATE.COLUMN_SCALE = 5;
				objVORDTLM_XCHG_RATE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_XCHG_RATE.Compulsory   = true;
				objVORDTLM_XCHG_RATE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_XCHG_RATE");
				objVORDTLM_XCHG_RATE.COLSPAN      = 1;
				objVORDTLM_XCHG_RATE.ROWSPAN      = 1;
				objVORDTLM_XCHG_RATE.Index        = 1120;
				objVORDTLM_XCHG_RATE.NEW_LINE     = false;
				objVORDTLM_XCHG_RATE.NEW_CELL     = true;
				objVORDTLM_XCHG_RATE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_XCHG_RATE);
				oWindow.Components.Add(objVORDTLM_XCHG_RATE);

#endregion //VORDTLM_XCHG_RATE

#region VORDTLM_SERIAL_NO
				objVORDTLM_SERIAL_NO.Name              = "Txt_VORDTLM_SERIAL_NO";
				objVORDTLM_SERIAL_NO.TABLE_COLUMN_NAME = "VORDTLM_SERIAL_NO";

				objVORDTLM_SERIAL_NO.OnBlurEvents = "";
				objVORDTLM_SERIAL_NO.Length       = 10;
				objVORDTLM_SERIAL_NO.Height       = 0;
				objVORDTLM_SERIAL_NO.COLUMN_SCALE = 0;
				objVORDTLM_SERIAL_NO.STATUS_CODE  = "";
				objVORDTLM_SERIAL_NO.Compulsory   = false;
				objVORDTLM_SERIAL_NO.Caption      = _Captions.Caption(this.UID_CODE,"lbl_SERIAL_NO");
				objVORDTLM_SERIAL_NO.COLSPAN      = 1;
				objVORDTLM_SERIAL_NO.ROWSPAN      = 1;
				objVORDTLM_SERIAL_NO.Index        = 1130;
				objVORDTLM_SERIAL_NO.NEW_LINE     = false;
				objVORDTLM_SERIAL_NO.NEW_CELL     = true;
				objVORDTLM_SERIAL_NO.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_SERIAL_NO);
				oWindow.Components.Add(objVORDTLM_SERIAL_NO);

#endregion //VORDTLM_SERIAL_NO

#region VORDTLM_SIGN_CODE
				objVORDTLM_SIGN_CODE.Name              = "Txt_VORDTLM_SIGN_CODE";
				objVORDTLM_SIGN_CODE.TABLE_COLUMN_NAME = "VORDTLM_SIGN_CODE";

				objVORDTLM_SIGN_CODE.OnBlurEvents = "";
				objVORDTLM_SIGN_CODE.Length       = 2;
				objVORDTLM_SIGN_CODE.Height       = 0;
				objVORDTLM_SIGN_CODE.COLUMN_SCALE = 0;
				objVORDTLM_SIGN_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_SIGN_CODE.Compulsory   = true;
				objVORDTLM_SIGN_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_SIGN_CODE");
				objVORDTLM_SIGN_CODE.COLSPAN      = 1;
				objVORDTLM_SIGN_CODE.ROWSPAN      = 1;
				objVORDTLM_SIGN_CODE.Index        = 1140;
				objVORDTLM_SIGN_CODE.NEW_LINE     = true;
				objVORDTLM_SIGN_CODE.NEW_CELL     = true;
				objVORDTLM_SIGN_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_SIGN_CODE);
				oWindow.Components.Add(objVORDTLM_SIGN_CODE);

					objVORDTLM_SIGN_CODE.OnBlurEvents="RefreshData('{D,C}','XREF','Txt_VORDTLM_SIGN_CODE');";

					objVORDTLM_SIGN_CODE.UGET_CODE="{D,C}";

#endregion //VORDTLM_SIGN_CODE

#region VARIABLE_VO_CCY_AMT
				objVARIABLE_VO_CCY_AMT.Name              = "Txt_VARIABLE_VO_CCY_AMT";
				objVARIABLE_VO_CCY_AMT.TABLE_COLUMN_NAME = "VARIABLE_VO_CCY_AMT";

				objVARIABLE_VO_CCY_AMT.OnBlurEvents = "";
				objVARIABLE_VO_CCY_AMT.Length       = 10;
				objVARIABLE_VO_CCY_AMT.Height       = 0;
				objVARIABLE_VO_CCY_AMT.COLUMN_SCALE = 2;
				objVARIABLE_VO_CCY_AMT.STATUS_CODE  = "ADDNEW,UPDATE";
				objVARIABLE_VO_CCY_AMT.Compulsory   = true;
				objVARIABLE_VO_CCY_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_CCY_AMT");
				objVARIABLE_VO_CCY_AMT.COLSPAN      = 1;
				objVARIABLE_VO_CCY_AMT.ROWSPAN      = 1;
				objVARIABLE_VO_CCY_AMT.Index        = 1150;
				objVARIABLE_VO_CCY_AMT.NEW_LINE     = false;
				objVARIABLE_VO_CCY_AMT.NEW_CELL     = true;
				objVARIABLE_VO_CCY_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_VO_CCY_AMT);
				oWindow.Components.Add(objVARIABLE_VO_CCY_AMT);

#endregion //VARIABLE_VO_CCY_AMT

#region VARIABLE_VO_DET_AMT
				objVARIABLE_VO_DET_AMT.Name              = "Txt_VARIABLE_VO_DET_AMT";
				objVARIABLE_VO_DET_AMT.TABLE_COLUMN_NAME = "VARIABLE_VO_DET_AMT";

				objVARIABLE_VO_DET_AMT.OnBlurEvents = "";
				objVARIABLE_VO_DET_AMT.Length       = 10;
				objVARIABLE_VO_DET_AMT.Height       = 0;
				objVARIABLE_VO_DET_AMT.COLUMN_SCALE = 2;
				objVARIABLE_VO_DET_AMT.STATUS_CODE  = "";
				objVARIABLE_VO_DET_AMT.Compulsory   = false;
				objVARIABLE_VO_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DET_AMT");
				objVARIABLE_VO_DET_AMT.COLSPAN      = 1;
				objVARIABLE_VO_DET_AMT.ROWSPAN      = 1;
				objVARIABLE_VO_DET_AMT.Index        = 1160;
				objVARIABLE_VO_DET_AMT.NEW_LINE     = false;
				objVARIABLE_VO_DET_AMT.NEW_CELL     = true;
				objVARIABLE_VO_DET_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_VO_DET_AMT);
				oWindow.Components.Add(objVARIABLE_VO_DET_AMT);

#endregion //VARIABLE_VO_DET_AMT

#region VORDTLM_VO_DOC_NAME01
				objVORDTLM_VO_DOC_NAME01.Name              = "Txt_VORDTLM_VO_DOC_NAME01";
				objVORDTLM_VO_DOC_NAME01.TABLE_COLUMN_NAME = "VORDTLM_VO_DOC_NAME01";

				objVORDTLM_VO_DOC_NAME01.OnBlurEvents = "";
				objVORDTLM_VO_DOC_NAME01.Length       = 40;
				objVORDTLM_VO_DOC_NAME01.Height       = 0;
				objVORDTLM_VO_DOC_NAME01.COLUMN_SCALE = 0;
				objVORDTLM_VO_DOC_NAME01.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_VO_DOC_NAME01.Compulsory   = false;
				objVORDTLM_VO_DOC_NAME01.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DOC_NAME01");
				objVORDTLM_VO_DOC_NAME01.COLSPAN      = 3;
				objVORDTLM_VO_DOC_NAME01.ROWSPAN      = 1;
				objVORDTLM_VO_DOC_NAME01.Index        = 1170;
				objVORDTLM_VO_DOC_NAME01.NEW_LINE     = true;
				objVORDTLM_VO_DOC_NAME01.NEW_CELL     = true;
				objVORDTLM_VO_DOC_NAME01.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_DOC_NAME01);
				oWindow.Components.Add(objVORDTLM_VO_DOC_NAME01);

#endregion //VORDTLM_VO_DOC_NAME01

#region VORDTLM_VO_RMKS
				objVORDTLM_VO_RMKS.Name              = "Txt_VORDTLM_VO_RMKS";
				objVORDTLM_VO_RMKS.TABLE_COLUMN_NAME = "VORDTLM_VO_RMKS";

				objVORDTLM_VO_RMKS.OnBlurEvents = "";
				objVORDTLM_VO_RMKS.Length       = 80;
				objVORDTLM_VO_RMKS.Height       = 0;
				objVORDTLM_VO_RMKS.COLUMN_SCALE = 0;
				objVORDTLM_VO_RMKS.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_VO_RMKS.Compulsory   = false;
				objVORDTLM_VO_RMKS.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_RMKS");
				objVORDTLM_VO_RMKS.COLSPAN      = 8;
				objVORDTLM_VO_RMKS.ROWSPAN      = 1;
				objVORDTLM_VO_RMKS.Index        = 1180;
				objVORDTLM_VO_RMKS.NEW_LINE     = true;
				objVORDTLM_VO_RMKS.NEW_CELL     = true;
				objVORDTLM_VO_RMKS.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_RMKS);
				oWindow.Components.Add(objVORDTLM_VO_RMKS);

#endregion //VORDTLM_VO_RMKS

#region VORDTLM_REQ_QTY
				objVORDTLM_REQ_QTY.Name              = "Txt_VORDTLM_REQ_QTY";
				objVORDTLM_REQ_QTY.TABLE_COLUMN_NAME = "VORDTLM_REQ_QTY";

				objVORDTLM_REQ_QTY.OnBlurEvents = "";
				objVORDTLM_REQ_QTY.Length       = 18;
				objVORDTLM_REQ_QTY.Height       = 0;
				objVORDTLM_REQ_QTY.COLUMN_SCALE = 2;
				objVORDTLM_REQ_QTY.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_REQ_QTY.Compulsory   = false;
				objVORDTLM_REQ_QTY.Caption      = _Captions.Caption(this.UID_CODE,"lbl_REQ_QTY");
				objVORDTLM_REQ_QTY.COLSPAN      = 1;
				objVORDTLM_REQ_QTY.ROWSPAN      = 1;
				objVORDTLM_REQ_QTY.Index        = 1190;
				objVORDTLM_REQ_QTY.NEW_LINE     = true;
				objVORDTLM_REQ_QTY.NEW_CELL     = true;
				objVORDTLM_REQ_QTY.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_REQ_QTY);
				oWindow.Components.Add(objVORDTLM_REQ_QTY);

#endregion //VORDTLM_REQ_QTY

#region VORDTLM_UOM_CODE
				objVORDTLM_UOM_CODE.Name              = "Txt_VORDTLM_UOM_CODE";
				objVORDTLM_UOM_CODE.TABLE_COLUMN_NAME = "VORDTLM_UOM_CODE";

				objVORDTLM_UOM_CODE.OnBlurEvents = "";
				objVORDTLM_UOM_CODE.Length       = 6;
				objVORDTLM_UOM_CODE.Height       = 0;
				objVORDTLM_UOM_CODE.COLUMN_SCALE = 0;
				objVORDTLM_UOM_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_UOM_CODE.Compulsory   = false;
				objVORDTLM_UOM_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_UOM_CODE");
				objVORDTLM_UOM_CODE.COLSPAN      = 1;
				objVORDTLM_UOM_CODE.ROWSPAN      = 1;
				objVORDTLM_UOM_CODE.Index        = 1200;
				objVORDTLM_UOM_CODE.NEW_LINE     = false;
				objVORDTLM_UOM_CODE.NEW_CELL     = true;
				objVORDTLM_UOM_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_UOM_CODE);
				oWindow.Components.Add(objVORDTLM_UOM_CODE);

					objVORDTLM_UOM_CODE.Browser        = objVORDTLM_UOM_CODEBrw;
					objVORDTLM_UOM_CODEBrw.UGET_CODE   = "UOM_CODE";
					objVORDTLM_UOM_CODEBrw.Data_Viewer = "";
					objVORDTLM_UOM_CODEBrw.ACTIVE_FIELD ="UOMTBLM.UOM_CODE";

					objVORDTLM_UOM_CODE.OnBlurEvents="RefreshData('UOM_CODE','XREF','Txt_VORDTLM_UOM_CODE');";

					objVORDTLM_UOM_CODE.UGET_CODE="UOM_CODE";

#endregion //VORDTLM_UOM_CODE

#region VORDTLM_DOC_NO
				objVORDTLM_DOC_NO.Name              = "Txt_VORDTLM_DOC_NO";
				objVORDTLM_DOC_NO.TABLE_COLUMN_NAME = "VORDTLM_DOC_NO";

				objVORDTLM_DOC_NO.OnBlurEvents = "";
				objVORDTLM_DOC_NO.Length       = 15;
				objVORDTLM_DOC_NO.Height       = 0;
				objVORDTLM_DOC_NO.COLUMN_SCALE = 0;
				objVORDTLM_DOC_NO.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_DOC_NO.Compulsory   = false;
				objVORDTLM_DOC_NO.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DOC_NO");
				objVORDTLM_DOC_NO.COLSPAN      = 1;
				objVORDTLM_DOC_NO.ROWSPAN      = 1;
				objVORDTLM_DOC_NO.Index        = 1280;
				objVORDTLM_DOC_NO.NEW_LINE     = true;
				objVORDTLM_DOC_NO.NEW_CELL     = true;
				objVORDTLM_DOC_NO.LINE_REVEAL  = true;

				oXForm.AddObject(objVORDTLM_DOC_NO);
				oWindow.Components.Add(objVORDTLM_DOC_NO);

#endregion //VORDTLM_DOC_NO

#region VORDTLM_DOC_TP_CODE
				objVORDTLM_DOC_TP_CODE.Name              = "Txt_VORDTLM_DOC_TP_CODE";
				objVORDTLM_DOC_TP_CODE.TABLE_COLUMN_NAME = "VORDTLM_DOC_TP_CODE";

				objVORDTLM_DOC_TP_CODE.OnBlurEvents = "";
				objVORDTLM_DOC_TP_CODE.Length       = 8;
				objVORDTLM_DOC_TP_CODE.Height       = 0;
				objVORDTLM_DOC_TP_CODE.COLUMN_SCALE = 0;
				objVORDTLM_DOC_TP_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_DOC_TP_CODE.Compulsory   = false;
				objVORDTLM_DOC_TP_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DOC_TP_CODE");
				objVORDTLM_DOC_TP_CODE.COLSPAN      = 1;
				objVORDTLM_DOC_TP_CODE.ROWSPAN      = 1;
				objVORDTLM_DOC_TP_CODE.Index        = 1290;
				objVORDTLM_DOC_TP_CODE.NEW_LINE     = false;
				objVORDTLM_DOC_TP_CODE.NEW_CELL     = true;
				objVORDTLM_DOC_TP_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_DOC_TP_CODE);
				oWindow.Components.Add(objVORDTLM_DOC_TP_CODE);

#endregion //VORDTLM_DOC_TP_CODE

#region VORDTLM_PAY_CODE
				objVORDTLM_PAY_CODE.Name              = "Txt_VORDTLM_PAY_CODE";
				objVORDTLM_PAY_CODE.TABLE_COLUMN_NAME = "VORDTLM_PAY_CODE";

				objVORDTLM_PAY_CODE.OnBlurEvents = "";
				objVORDTLM_PAY_CODE.Length       = 8;
				objVORDTLM_PAY_CODE.Height       = 0;
				objVORDTLM_PAY_CODE.COLUMN_SCALE = 0;
				objVORDTLM_PAY_CODE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_PAY_CODE.Compulsory   = false;
				objVORDTLM_PAY_CODE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_PMT_CODE");
				objVORDTLM_PAY_CODE.COLSPAN      = 1;
				objVORDTLM_PAY_CODE.ROWSPAN      = 1;
				objVORDTLM_PAY_CODE.Index        = 1300;
				objVORDTLM_PAY_CODE.NEW_LINE     = false;
				objVORDTLM_PAY_CODE.NEW_CELL     = true;
				objVORDTLM_PAY_CODE.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_PAY_CODE);
				oWindow.Components.Add(objVORDTLM_PAY_CODE);

					objVORDTLM_PAY_CODE.Browser        = objVORDTLM_PAY_CODEBrw;
					objVORDTLM_PAY_CODEBrw.UGET_CODE   = "PAY_CODE";
					objVORDTLM_PAY_CODEBrw.Data_Viewer = "";
					objVORDTLM_PAY_CODEBrw.ACTIVE_FIELD ="PMTCDTM.PMT_CODE";

					objVORDTLM_PAY_CODE.OnBlurEvents="RefreshData('PAY_CODE','XREF','Txt_VORDTLM_PAY_CODE');";

					objVORDTLM_PAY_CODE.UGET_CODE="PAY_CODE";

#endregion //VORDTLM_PAY_CODE

#region VORDTLM_DOC_REF_NO
				objVORDTLM_DOC_REF_NO.Name              = "Txt_VORDTLM_DOC_REF_NO";
				objVORDTLM_DOC_REF_NO.TABLE_COLUMN_NAME = "VORDTLM_DOC_REF_NO";

				objVORDTLM_DOC_REF_NO.OnBlurEvents = "";
				objVORDTLM_DOC_REF_NO.Length       = 15;
				objVORDTLM_DOC_REF_NO.Height       = 0;
				objVORDTLM_DOC_REF_NO.COLUMN_SCALE = 0;
				objVORDTLM_DOC_REF_NO.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_DOC_REF_NO.Compulsory   = false;
				objVORDTLM_DOC_REF_NO.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DOC_REF_NO");
				objVORDTLM_DOC_REF_NO.COLSPAN      = 1;
				objVORDTLM_DOC_REF_NO.ROWSPAN      = 1;
				objVORDTLM_DOC_REF_NO.Index        = 1310;
				objVORDTLM_DOC_REF_NO.NEW_LINE     = true;
				objVORDTLM_DOC_REF_NO.NEW_CELL     = true;
				objVORDTLM_DOC_REF_NO.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_DOC_REF_NO);
				oWindow.Components.Add(objVORDTLM_DOC_REF_NO);

#endregion //VORDTLM_DOC_REF_NO

#region VORDTLM_DOC_REQ_DATE
				objVORDTLM_DOC_REQ_DATE.Name              = "Txt_VORDTLM_DOC_REQ_DATE";
				objVORDTLM_DOC_REQ_DATE.TABLE_COLUMN_NAME = "VORDTLM_DOC_REQ_DATE";

				objVORDTLM_DOC_REQ_DATE.OnBlurEvents = "";
				objVORDTLM_DOC_REQ_DATE.Length       = 0;
				objVORDTLM_DOC_REQ_DATE.Height       = 0;
				objVORDTLM_DOC_REQ_DATE.COLUMN_SCALE = 0;
				objVORDTLM_DOC_REQ_DATE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_DOC_REQ_DATE.Compulsory   = false;
				objVORDTLM_DOC_REQ_DATE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DOC_REQ_DATE");
				objVORDTLM_DOC_REQ_DATE.COLSPAN      = 1;
				objVORDTLM_DOC_REQ_DATE.ROWSPAN      = 1;
				objVORDTLM_DOC_REQ_DATE.Index        = 1320;
				objVORDTLM_DOC_REQ_DATE.NEW_LINE     = false;
				objVORDTLM_DOC_REQ_DATE.NEW_CELL     = true;
				objVORDTLM_DOC_REQ_DATE.LINE_REVEAL  = false;

					objVORDTLM_DOC_REQ_DATE.Title=_Captions.Caption("lbl_Date_Column_Title");

				oXForm.AddObject(objVORDTLM_DOC_REQ_DATE);
				oWindow.Components.Add(objVORDTLM_DOC_REQ_DATE);

#endregion //VORDTLM_DOC_REQ_DATE

#region VORDTLM_DOC_DUE_DATE
				objVORDTLM_DOC_DUE_DATE.Name              = "Txt_VORDTLM_DOC_DUE_DATE";
				objVORDTLM_DOC_DUE_DATE.TABLE_COLUMN_NAME = "VORDTLM_DOC_DUE_DATE";

				objVORDTLM_DOC_DUE_DATE.OnBlurEvents = "";
				objVORDTLM_DOC_DUE_DATE.Length       = 0;
				objVORDTLM_DOC_DUE_DATE.Height       = 0;
				objVORDTLM_DOC_DUE_DATE.COLUMN_SCALE = 0;
				objVORDTLM_DOC_DUE_DATE.STATUS_CODE  = "ADDNEW,UPDATE";
				objVORDTLM_DOC_DUE_DATE.Compulsory   = false;
				objVORDTLM_DOC_DUE_DATE.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DOC_DUE_DATE");
				objVORDTLM_DOC_DUE_DATE.COLSPAN      = 1;
				objVORDTLM_DOC_DUE_DATE.ROWSPAN      = 1;
				objVORDTLM_DOC_DUE_DATE.Index        = 1330;
				objVORDTLM_DOC_DUE_DATE.NEW_LINE     = false;
				objVORDTLM_DOC_DUE_DATE.NEW_CELL     = true;
				objVORDTLM_DOC_DUE_DATE.LINE_REVEAL  = false;

					objVORDTLM_DOC_DUE_DATE.Title=_Captions.Caption("lbl_Date_Column_Title");

				oXForm.AddObject(objVORDTLM_DOC_DUE_DATE);
				oWindow.Components.Add(objVORDTLM_DOC_DUE_DATE);

#endregion //VORDTLM_DOC_DUE_DATE

#region VORDTLM_VO_DR_DET_AMT
				objVORDTLM_VO_DR_DET_AMT.Name              = "Txt_VORDTLM_VO_DR_DET_AMT";
				objVORDTLM_VO_DR_DET_AMT.TABLE_COLUMN_NAME = "VORDTLM_VO_DR_DET_AMT";

				objVORDTLM_VO_DR_DET_AMT.OnBlurEvents = "";
				objVORDTLM_VO_DR_DET_AMT.Length       = 18;
				objVORDTLM_VO_DR_DET_AMT.Height       = 0;
				objVORDTLM_VO_DR_DET_AMT.COLUMN_SCALE = 2;
				objVORDTLM_VO_DR_DET_AMT.STATUS_CODE  = "HIDDEN";
				objVORDTLM_VO_DR_DET_AMT.Compulsory   = false;
				objVORDTLM_VO_DR_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DR_DET_AMT");
				objVORDTLM_VO_DR_DET_AMT.COLSPAN      = 1;
				objVORDTLM_VO_DR_DET_AMT.ROWSPAN      = 1;
				objVORDTLM_VO_DR_DET_AMT.Index        = 1340;
				objVORDTLM_VO_DR_DET_AMT.NEW_LINE     = true;
				objVORDTLM_VO_DR_DET_AMT.NEW_CELL     = true;
				objVORDTLM_VO_DR_DET_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_DR_DET_AMT);
				oWindow.Components.Add(objVORDTLM_VO_DR_DET_AMT);

#endregion //VORDTLM_VO_DR_DET_AMT

#region VORDTLM_VO_DR_CCY_AMT
				objVORDTLM_VO_DR_CCY_AMT.Name              = "Txt_VORDTLM_VO_DR_CCY_AMT";
				objVORDTLM_VO_DR_CCY_AMT.TABLE_COLUMN_NAME = "VORDTLM_VO_DR_CCY_AMT";

				objVORDTLM_VO_DR_CCY_AMT.OnBlurEvents = "";
				objVORDTLM_VO_DR_CCY_AMT.Length       = 18;
				objVORDTLM_VO_DR_CCY_AMT.Height       = 0;
				objVORDTLM_VO_DR_CCY_AMT.COLUMN_SCALE = 2;
				objVORDTLM_VO_DR_CCY_AMT.STATUS_CODE  = "HIDDEN";
				objVORDTLM_VO_DR_CCY_AMT.Compulsory   = false;
				objVORDTLM_VO_DR_CCY_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_DR_CCY_AMT");
				objVORDTLM_VO_DR_CCY_AMT.COLSPAN      = 1;
				objVORDTLM_VO_DR_CCY_AMT.ROWSPAN      = 1;
				objVORDTLM_VO_DR_CCY_AMT.Index        = 1350;
				objVORDTLM_VO_DR_CCY_AMT.NEW_LINE     = true;
				objVORDTLM_VO_DR_CCY_AMT.NEW_CELL     = true;
				objVORDTLM_VO_DR_CCY_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_DR_CCY_AMT);
				oWindow.Components.Add(objVORDTLM_VO_DR_CCY_AMT);

#endregion //VORDTLM_VO_DR_CCY_AMT

#region VORDTLM_VO_CR_DET_AMT
				objVORDTLM_VO_CR_DET_AMT.Name              = "Txt_VORDTLM_VO_CR_DET_AMT";
				objVORDTLM_VO_CR_DET_AMT.TABLE_COLUMN_NAME = "VORDTLM_VO_CR_DET_AMT";

				objVORDTLM_VO_CR_DET_AMT.OnBlurEvents = "";
				objVORDTLM_VO_CR_DET_AMT.Length       = 18;
				objVORDTLM_VO_CR_DET_AMT.Height       = 0;
				objVORDTLM_VO_CR_DET_AMT.COLUMN_SCALE = 2;
				objVORDTLM_VO_CR_DET_AMT.STATUS_CODE  = "HIDDEN";
				objVORDTLM_VO_CR_DET_AMT.Compulsory   = false;
				objVORDTLM_VO_CR_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_CR_DET_AMT");
				objVORDTLM_VO_CR_DET_AMT.COLSPAN      = 1;
				objVORDTLM_VO_CR_DET_AMT.ROWSPAN      = 1;
				objVORDTLM_VO_CR_DET_AMT.Index        = 1360;
				objVORDTLM_VO_CR_DET_AMT.NEW_LINE     = true;
				objVORDTLM_VO_CR_DET_AMT.NEW_CELL     = true;
				objVORDTLM_VO_CR_DET_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_CR_DET_AMT);
				oWindow.Components.Add(objVORDTLM_VO_CR_DET_AMT);

#endregion //VORDTLM_VO_CR_DET_AMT

#region VORDTLM_VO_CR_CCY_AMT
				objVORDTLM_VO_CR_CCY_AMT.Name              = "Txt_VORDTLM_VO_CR_CCY_AMT";
				objVORDTLM_VO_CR_CCY_AMT.TABLE_COLUMN_NAME = "VORDTLM_VO_CR_CCY_AMT";

				objVORDTLM_VO_CR_CCY_AMT.OnBlurEvents = "";
				objVORDTLM_VO_CR_CCY_AMT.Length       = 18;
				objVORDTLM_VO_CR_CCY_AMT.Height       = 0;
				objVORDTLM_VO_CR_CCY_AMT.COLUMN_SCALE = 2;
				objVORDTLM_VO_CR_CCY_AMT.STATUS_CODE  = "HIDDEN";
				objVORDTLM_VO_CR_CCY_AMT.Compulsory   = false;
				objVORDTLM_VO_CR_CCY_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_VO_CR_CCY_AMT");
				objVORDTLM_VO_CR_CCY_AMT.COLSPAN      = 1;
				objVORDTLM_VO_CR_CCY_AMT.ROWSPAN      = 1;
				objVORDTLM_VO_CR_CCY_AMT.Index        = 1370;
				objVORDTLM_VO_CR_CCY_AMT.NEW_LINE     = true;
				objVORDTLM_VO_CR_CCY_AMT.NEW_CELL     = true;
				objVORDTLM_VO_CR_CCY_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVORDTLM_VO_CR_CCY_AMT);
				oWindow.Components.Add(objVORDTLM_VO_CR_CCY_AMT);

#endregion //VORDTLM_VO_CR_CCY_AMT

#region VARIABLE_DR_DET_AMT
				objVARIABLE_DR_DET_AMT.Name              = "Txt_VARIABLE_DR_DET_AMT";
				objVARIABLE_DR_DET_AMT.TABLE_COLUMN_NAME = "VARIABLE_DR_DET_AMT";

				objVARIABLE_DR_DET_AMT.OnBlurEvents = "";
				objVARIABLE_DR_DET_AMT.Length       = 10;
				objVARIABLE_DR_DET_AMT.Height       = 0;
				objVARIABLE_DR_DET_AMT.COLUMN_SCALE = 2;
				objVARIABLE_DR_DET_AMT.STATUS_CODE  = "";
				objVARIABLE_DR_DET_AMT.Compulsory   = false;
				objVARIABLE_DR_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DR_DET_AMT");
				objVARIABLE_DR_DET_AMT.COLSPAN      = 1;
				objVARIABLE_DR_DET_AMT.ROWSPAN      = 1;
				objVARIABLE_DR_DET_AMT.Index        = 1380;
				objVARIABLE_DR_DET_AMT.NEW_LINE     = true;
				objVARIABLE_DR_DET_AMT.NEW_CELL     = true;
				objVARIABLE_DR_DET_AMT.LINE_REVEAL  = true;

				oXForm.AddObject(objVARIABLE_DR_DET_AMT);
				oWindow.Components.Add(objVARIABLE_DR_DET_AMT);

#endregion //VARIABLE_DR_DET_AMT

#region VARIABLE_CR_DET_AMT
				objVARIABLE_CR_DET_AMT.Name              = "Txt_VARIABLE_CR_DET_AMT";
				objVARIABLE_CR_DET_AMT.TABLE_COLUMN_NAME = "VARIABLE_CR_DET_AMT";

				objVARIABLE_CR_DET_AMT.OnBlurEvents = "";
				objVARIABLE_CR_DET_AMT.Length       = 10;
				objVARIABLE_CR_DET_AMT.Height       = 0;
				objVARIABLE_CR_DET_AMT.COLUMN_SCALE = 2;
				objVARIABLE_CR_DET_AMT.STATUS_CODE  = "";
				objVARIABLE_CR_DET_AMT.Compulsory   = false;
				objVARIABLE_CR_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_CR_DET_AMT");
				objVARIABLE_CR_DET_AMT.COLSPAN      = 1;
				objVARIABLE_CR_DET_AMT.ROWSPAN      = 1;
				objVARIABLE_CR_DET_AMT.Index        = 1390;
				objVARIABLE_CR_DET_AMT.NEW_LINE     = false;
				objVARIABLE_CR_DET_AMT.NEW_CELL     = true;
				objVARIABLE_CR_DET_AMT.LINE_REVEAL  = true;

				oXForm.AddObject(objVARIABLE_CR_DET_AMT);
				oWindow.Components.Add(objVARIABLE_CR_DET_AMT);

#endregion //VARIABLE_CR_DET_AMT

#region VARIABLE_DIFF_DET_AMT
				objVARIABLE_DIFF_DET_AMT.Name              = "Txt_VARIABLE_DIFF_DET_AMT";
				objVARIABLE_DIFF_DET_AMT.TABLE_COLUMN_NAME = "VARIABLE_DIFF_DET_AMT";

				objVARIABLE_DIFF_DET_AMT.OnBlurEvents = "";
				objVARIABLE_DIFF_DET_AMT.Length       = 10;
				objVARIABLE_DIFF_DET_AMT.Height       = 0;
				objVARIABLE_DIFF_DET_AMT.COLUMN_SCALE = 2;
				objVARIABLE_DIFF_DET_AMT.STATUS_CODE  = "";
				objVARIABLE_DIFF_DET_AMT.Compulsory   = false;
				objVARIABLE_DIFF_DET_AMT.Caption      = _Captions.Caption(this.UID_CODE,"lbl_DIFF_DET_AMT");
				objVARIABLE_DIFF_DET_AMT.COLSPAN      = 1;
				objVARIABLE_DIFF_DET_AMT.ROWSPAN      = 1;
				objVARIABLE_DIFF_DET_AMT.Index        = 1400;
				objVARIABLE_DIFF_DET_AMT.NEW_LINE     = false;
				objVARIABLE_DIFF_DET_AMT.NEW_CELL     = true;
				objVARIABLE_DIFF_DET_AMT.LINE_REVEAL  = false;

				oXForm.AddObject(objVARIABLE_DIFF_DET_AMT);
				oWindow.Components.Add(objVARIABLE_DIFF_DET_AMT);

#endregion //VARIABLE_DIFF_DET_AMT

			_ZZCDF.Process();

			foreach (VContexts oVContexts in _ZZCDF.ZZCDFS) 
			{
				AComponent oCDFElement;

				if (oVContexts.getValue("CDF_TP_CODE")=="D")
				{
					oCDFElement=new WebDateBox();
				}else if (oVContexts.getValue("CDF_CODE")=="L")
				{
					oCDFElement=new WebCheckBox();
				}else if (oVContexts.getValue("CDF_CODE")=="N")
				{
					oCDFElement=new WebFloatBox();
				}else{
					oCDFElement=new WebTextBox();
				}

				oCDFElement.Name          = "Txt_CDF_"+oVContexts.getValue("CDF_CODE");
				oCDFElement.Length        = oVContexts.getInteger("CDF_LENGTH");
				oCDFElement.Height        = 1;
				oCDFElement.COLUMN_SCALE = oVContexts.getInteger("COLUMN_SCALE");
				oCDFElement.STATUS_CODE   = oVContexts.getValue("STATUS_CODE");
				oCDFElement.Compulsory    = !oVContexts.getBoolean("COLUMN_NULLABLE");

				if (oVContexts.getValue("LABEL_ID")!="")
				{
					oCDFElement.Caption     =_Captions.Caption(this.UID_CODE,oVContexts.getValue("LABEL_ID"));
				}else{
					oCDFElement.Caption     =oVContexts.getValue("CDF_NAME01");
				}
				oCDFElement.COLSPAN      = 1;
				oCDFElement.ROWSPAN      = 1;
				oCDFElement.Index        = oVContexts.getInteger("ORDINAL");
				oCDFElement.NEW_LINE     = true;
				oCDFElement.NEW_CELL     = true;
				oCDFElement.LINE_REVEAL  = false;

				_ZZCDFElect.Add(oCDFElement);
				oXForm.AddObject(oCDFElement);
				oWindow.Components.Add(oCDFElement);

			}

#endregion

				if (_DocsPermission.AccessRight(this.UID_CODE,this.ZZLOGON_ID,"SECURITY_CODE")==true)
				{
#region SECURITY_CODE

							objVORDTLM_USECURITY_CODE1.NEW_LINE    =true;
						objVORDTLM_USECURITY_CODE1.Name    = "Txt_VORDTLM_USECURITY_CODE1";
						objVORDTLM_USECURITY_CODE1.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE1");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE1);

											objVORDTLM_USECURITY_CODE2.Name    = "Txt_VORDTLM_USECURITY_CODE2";
						objVORDTLM_USECURITY_CODE2.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE2");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE2);

												objVORDTLM_USECURITY_CODE3.NEW_LINE    =true;
						objVORDTLM_USECURITY_CODE3.Name    = "Txt_VORDTLM_USECURITY_CODE3";
						objVORDTLM_USECURITY_CODE3.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE3");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE3);

											objVORDTLM_USECURITY_CODE4.Name    = "Txt_VORDTLM_USECURITY_CODE4";
						objVORDTLM_USECURITY_CODE4.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE4");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE4);

												objVORDTLM_USECURITY_CODE5.NEW_LINE    =true;
						objVORDTLM_USECURITY_CODE5.Name    = "Txt_VORDTLM_USECURITY_CODE5";
						objVORDTLM_USECURITY_CODE5.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE5");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE5);

											objVORDTLM_USECURITY_CODE6.Name    = "Txt_VORDTLM_USECURITY_CODE6";
						objVORDTLM_USECURITY_CODE6.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE6");
						oXForm.AuthObject(objVORDTLM_USECURITY_CODE6);

					#region USECURITY_RIGHT

					objVORDTLM_USECURITY_RIGHT.NEW_LINE = true;
					objVORDTLM_USECURITY_RIGHT.Name     = "Txt_VORDTLM_USECURITY_RIGHT";
					objVORDTLM_USECURITY_RIGHT.Caption  = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_RIGHT");
					oXForm.AuthObject(objVORDTLM_USECURITY_RIGHT);

#endregion

#region USTAGE_CODE

					objVORDTLM_USTAGE_CODE.NEW_LINE = false;
					objVORDTLM_USTAGE_CODE.Name     = "Txt_VORDTLM_USTAGE_CODE";
					objVORDTLM_USTAGE_CODE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_USTAGE_CODE");
					oXForm.AuthObject(objVORDTLM_USTAGE_CODE);

#endregion

#region ZADD_DATE

					objVORDTLM_UZADD_DATE.NEW_LINE = true;
					objVORDTLM_UZADD_DATE.Name     = "Txt_VORDTLM_UZADD_DATE";
					objVORDTLM_UZADD_DATE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_UZADD_DATE");
					oXForm.AuthObject(objVORDTLM_UZADD_DATE);

#endregion

#region ZADD_USER

					objVORDTLM_UZADD_USER.Name    = "Txt_VORDTLM_UZADD_USER";
					objVORDTLM_UZADD_USER.Caption = _Captions.Caption(this.UID_CODE,"lbl_UZADD_USER");
					oXForm.AuthObject(objVORDTLM_UZADD_USER);

#endregion

#region ZCHG_DATE
					objVORDTLM_UZCHG_DATE.NEW_LINE = true;
					objVORDTLM_UZCHG_DATE.Name     = "Txt_VORDTLM_UZCHG_DATE";
					objVORDTLM_UZCHG_DATE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_UZCHG_DATE");
					oXForm.AuthObject(objVORDTLM_UZCHG_DATE);

#endregion

#region ZCHG_USER
					objVORDTLM_UZCHG_USER.Name    = "Txt_VORDTLM_UZCHG_USER";
					objVORDTLM_UZCHG_USER.Caption = _Captions.Caption(this.UID_CODE,"lbl_UZCHG_USER");
					oXForm.AuthObject(objVORDTLM_UZCHG_USER);
#endregion
				}

#endregion

#region UXDIR_CODE
			objDATA_VFS_UXDIR_CODE.Name        = "Txt_DATA_VFS_UXDIR_CODE";
			objDATA_VFS_UXDIR_CODE.Caption     = _Captions.Caption(this.UID_CODE,"lbl_UXDIR_CODE");
			objDATA_VFS_UXDIR_CODE.NEW_CELL    = true;
			objDATA_VFS_UXDIR_CODE.NEW_LINE    = true;
			objDATA_VFS_UXDIR_CODE.Index       = 102002;
			objDATA_VFS_UXDIR_CODE.STATUS_CODE = "HIDDEN";

			oXForm.AddObject(objDATA_VFS_UXDIR_CODE);
			oWindow.Components.Add(objDATA_VFS_UXDIR_CODE);

#endregion

#region XUID_CODE
			objVORDTLM_XUID_CODE.NEW_LINE = true;
			objVORDTLM_XUID_CODE.Name     = "Txt_VORDTLM_XUID_CODE";
			objVORDTLM_XUID_CODE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_XUID_CODE");
			objVORDTLM_XUID_CODE.Text     = "UID02204B";
			oXForm.AuthObject(objVORDTLM_XUID_CODE);
#endregion

			_Captions.Caption(this.UID_CODE,"lbl_XUID_CODE");

			objXDepend.Process();

			oXForm.AddXDepend(objXDepend.Depends);

			oWindow.AddWebForm(oXForm);

			//if (this.ZZEventStatus=="ADDNEW")
			//{
			//}else if (this.ZZEventStatus=="UPDATE")
			//{
			//}

			//_WebCells.ZZMUKI_EDITION = MUKI_EDITION;
			_WebCells.Name= "QID02204B";
			_WebCells.UID_CODE    = this.UID_CODE;
			_WebCells.USQL_CODE   = "QID02204B";
			_WebCells.STATUS_CODE = "VIEW";
			_WebCells.DbName    = this.DbName;
			_WebCells.PageSize    = 15;
			_WebCells.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			_WebCells.ZZLOGON_SSD = this.ZZLOGON_SSD;
			_WebCells.OnInit(objHttpContext);

				if (_WebCells.USQL_CODE!="")
				{
					oWindow.AddWxfPanel(_WebCells);
				}

				oWindow.DbName = this.DbName;
			oWindow.OnInit(objHttpContext);
		}

		public void Render(HtmlTextWriter objTextWriter)
		{

#region Toolbar

			dbToolbar objdbToolbar   = new dbToolbar();
			objdbToolbar.BTNS_CODE   = "BASIC;";
			objdbToolbar.UID_CODE    = this.UID_CODE;
			objdbToolbar.Trans       = this.Trans;
			objdbToolbar.DATA_STATUS_CODE = _UID02204BEntity.DATA_STATUS_CODE;
			objdbToolbar.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			objdbToolbar.ZZLOGON_SSD   = this.ZZLOGON_SSD;
			objdbToolbar.VIEW_MODE_CODE = this.ZZVIEW_MODE_CODE;

			ZZBTNS oZZBTNS         = new ZZBTNS();
			oZZBTNS.BTNS_CODE      = "UID02204B;Basic_VFS;BASIC_Actions";
			oZZBTNS.UID_CODE       = this.UID_CODE;
			oZZBTNS.BTN_CLASS_CODE = "FUNS";
			oZZBTNS.Trans          = this.Trans;
			oZZBTNS.ODTP_STATUS_CODE = objdbToolbar.ODTP_STATUS_CODE;
			oZZBTNS.DATA_STATUS_CODE = _UID02204BEntity.DATA_STATUS_CODE;
			oZZBTNS.ZZLOGON_LANG   = this.ZZLOGON_LANG;
			oZZBTNS.ZZLOGON_SSD    = this.ZZLOGON_SSD;
			oZZBTNS.VIEW_MODE_CODE = this.ZZVIEW_MODE_CODE;
			oZZBTNS.Process();

			ZZTrace.Debug(ZFILE_NAME,"oZZBTNS.BTNS.Count=["+oZZBTNS.BTNS.Count+"]");

			objdbToolbar.ActionsBTNS=oZZBTNS.BTNS;

			ZZBTNS oPRINTS           = new ZZBTNS();
			oPRINTS.BTNS_CODE        = "UID02204B;BASIC_Print";
			oPRINTS.UID_CODE         = this.UID_CODE;
			oPRINTS.BTN_CLASS_CODE   = "PRINT";
			oPRINTS.VIEW_MODE_CODE = this.ZZVIEW_MODE_CODE;
			oPRINTS.Trans            = this.Trans;
			oPRINTS.ODTP_STATUS_CODE = objdbToolbar.ODTP_STATUS_CODE;
			oPRINTS.DATA_STATUS_CODE = _UID02204BEntity.DATA_STATUS_CODE;
			oPRINTS.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			oPRINTS.ZZLOGON_SSD = this.ZZLOGON_SSD;
			oPRINTS.Process();

			objdbToolbar.PrintBTNS=oPRINTS.BTNS;

			objdbToolbar.Process();

			objWebBTNS= objdbToolbar.XWebBTNS;
			oWindow.AddToolBar(objWebBTNS);
			oWindow.BTNS = objdbToolbar.BTNS;
#endregion

			objVORDTLM_USTAGE_CODE.Text=this.ZZVIEW_MODE_CODE;

			_STATUS_DATA["UID02204B","ZZVIEW_MODE_CODE"]   = this.ZZVIEW_MODE_CODE;
			_STATUS_DATA["UID02204B","ZZVIEW_STATUS_CODE"] = this.ZZVIEW_STATUS_CODE;

			oWindow.VIEW_STATUS_CODE  = this.ZZVIEW_STATUS_CODE;
			oWindow.VIEW_MODE_CODE  = this.ZZVIEW_MODE_CODE;

			_WebCells.ZZLOGON_LANG  = this.ZZLOGON_LANG;
			_WebCells.STATUS_CODE   = "VIEW";
			_WebCells.WXFLite       = this.Entity.Wxf;
			_WebCells.OperationMode = "EDIT";
			_WebCells.ZZLOGON_ID    = this.ZZLOGON_ID;
			_WebCells.Trans         = this.Trans;
			_WebCells.Process();

			oWindow.WindowsStatus = _STATUS_DATA;
			oWindow.UID_CODE      = "UID02204B";
			oWindow.Template      = "";
			oWindow.APP_PATH      = this.APP_PATH;
			ZZTrace.Debug(ZFILE_NAME,this.APP_PATH+"System\\templates\\");

			if (File.Exists(this.APP_PATH+"System\\templates\\"))
			{
				oWindow.Tmpl         = TmplManager.FromString(ZZGeneral.ReadStream(this.APP_PATH+"System\\templates\\").ToString());
			}else	if (File.Exists(this.APP_PATH+"System\\templates\\UID02204B.tpl"))
			{
				oWindow.Tmpl         = TmplManager.FromString(ZZGeneral.ReadStream(this.APP_PATH+"System\\templates\\UID02204B.tpl").ToString());
			}
			oWindow.Trans         = this.Trans;
			oWindow.Exceptions    = this.Exceptions;
			
			objXDeclareBlock.ZZLOGON_SSD=this.ZZLOGON_SSD;
			objXDeclareBlock.DbName=this.DbName;
			objXDeclareBlock.ZZLOGON_LANG  =this.ZZLOGON_LANG;
			objXDeclareBlock.Trans =this.Trans;
			objXDeclareBlock.Render(objTextWriter);

			oWindow.Render(objTextWriter);

			objTextWriter.WriteLine("<script type='text/javascript'>");
			objTextWriter.WriteLine("");

			objTextWriter.WriteLine("$(document).ready(function ()");
			objTextWriter.WriteLine("{");
			objTextWriter.WriteLine("var vModels = avalon.define(\"Fields\", function(vm) {");

			objTextWriter.WriteLine("vm.Models={");
			foreach (AComponent oElement in oXForm.Objects)
			{
				if  (oElement.TABLE_COLUMN_NAME!=""){
					objTextWriter.WriteLine(oElement.TABLE_COLUMN_NAME+":{");
					objTextWriter.WriteLine("Text:\""+Dot.StreamObject.Util.EscapeString(oElement.Text)+"\",");
					objTextWriter.WriteLine("Class:\""+oElement.ClassName+"\",");
					if (oElement.Readonly){
						objTextWriter.WriteLine("Readonly:true");
					}else{
						objTextWriter.WriteLine("Readonly:false");
					}
					objTextWriter.WriteLine("},");
					objTextWriter.WriteLine("");
				}
			}
			objTextWriter.WriteLine("};");
			objTextWriter.WriteLine("");
	
			objTextWriter.WriteLine("vm.Buttons={");
			foreach (WebImageButton oElement in objdbToolbar.XWebBTNS.WebButtons)
			{
				if  (oElement.TABLE_COLUMN_NAME!=""){
					objTextWriter.WriteLine(oElement.TABLE_COLUMN_NAME+":{");
					objTextWriter.WriteLine("Title:\""+oElement.Title+"\",");
					objTextWriter.WriteLine("ImageUrl:\""+oElement.ImageUrl+"\",");
					if (oElement.Readonly){
						objTextWriter.WriteLine("Class:\"dbutton\"");
					}else{
						objTextWriter.WriteLine("Class:\"abutton\"");
					}

					objTextWriter.WriteLine("},");
					objTextWriter.WriteLine("");
				}
			}
			objTextWriter.WriteLine("};");
			objTextWriter.WriteLine("");
	
			objTextWriter.WriteLine("});");
			objTextWriter.WriteLine("");
			objTextWriter.WriteLine("avalon.scan();");
			objTextWriter.WriteLine("});");
			objTextWriter.WriteLine("</script>");
			
			oXFinallyBlock.ZZLOGON_SSD=this.ZZLOGON_SSD;
			oXFinallyBlock.DbName=this.DbName;
			oXFinallyBlock.ZZLOGON_LANG  =this.ZZLOGON_LANG;
			oXFinallyBlock.UID_CODE  =this.UID_CODE;
			oXFinallyBlock.APP_PATH  =this.APP_PATH;
			oXFinallyBlock.Trans =this.Trans;
			oXFinallyBlock.Render(objTextWriter);

		}

		private XForm             oXForm;             
		private WebPanels         objWebPanels    = new WebPanels();
		private ZZDocsPermission  _DocsPermission = new ZZDocsPermission();
		private	XStatus           _STATUS_DATA    = new XStatus();
		private	WebLookup         _WebLookup      = new WebLookup();
		private Window            oWindow         = new Window();
		private WebBTNS           objWebBTNS      = new WebBTNS();
		private WebCells          _WebCells       = new WebCells();
		private XFinallyBlock   oXFinallyBlock    = new XFinallyBlock();
		private	XDeclareBlock   objXDeclareBlock  = new XDeclareBlock();

			private WebCaption objVORDTLM_USECURITY_CODE1 =new WebCaption();
					private WebCaption objVORDTLM_USECURITY_CODE2 =new WebCaption();
					private WebCaption objVORDTLM_USECURITY_CODE3 =new WebCaption();
					private WebCaption objVORDTLM_USECURITY_CODE4 =new WebCaption();
					private WebCaption objVORDTLM_USECURITY_CODE5 =new WebCaption();
					private WebCaption objVORDTLM_USECURITY_CODE6 =new WebCaption();
		
		private WebCaption  objVORDTLM_UZADD_DATE      = new WebCaption();
		private WebCaption  objVORDTLM_UZADD_USER      = new WebCaption();
		private WebCaption  objVORDTLM_UZCHG_DATE      = new WebCaption();
		private WebCaption  objVORDTLM_UZCHG_USER      = new WebCaption();
		private WebCaption  objVORDTLM_USECURITY_RIGHT = new WebCaption();
		private WebCaption  objVORDTLM_USTAGE_CODE     = new WebCaption();
		private WebHideBox  objDATA_VFS_UXDIR_CODE           = new WebHideBox();
		private WebCaption  objVORDTLM_XUID_CODE       = new WebCaption();

		private List<AComponent>  _ZZCDFElect     = new List<AComponent>();
		public List<LogisticException> Exceptions = new List<LogisticException>();

		private string  _APP_PATH           = "";
		private string  _ATVT_CODE          = "";
		private string  UID_CODE            = "UID02204B";
		private string  _DbName             = "";
		private string  _DATA_STATUS_CODE   = "NONE";
		private string  _ZZLOGON_LANG       = "";
		private string  _ZZLOGON_SSD        = "";
		private string  _ZZEventOpts        = "";
		private string  _ZZVIEW_MODE_CODE   = "";
		private string  _ZZVIEW_STATUS_CODE = "";
		private string  _ZZMODEL_DATA       = "";
		private string  _ZZEventStatus      = "";
		private string  _ZZEventMode        = "";
		private string  _ZZEventArgs        = "";
		private string  _ZZLOGON_ID         = "";
		private string  _lnk_RW_NO          = "-1";
		private string  _lnk_MODE           = "-1";

		private StreamContext _Trans;
		private Wxf            _Wxf                = new Wxf();
		private XConvert       _Convert            = new XConvert();
		private ZZCaptions     _Captions           = new ZZCaptions();
		private UID02204BE   _UID02204BEntity  = new UID02204BE();

		public UID02204BE Entity { get { return  _UID02204BEntity ; } set { _UID02204BEntity = value; }  }

		public string   lnk_MODE    { get { return _lnk_MODE;       } set { _lnk_MODE       = value; }  }
		public string   lnk_RW_NO   { get { return _lnk_RW_NO;      } set { _lnk_RW_NO      = value; }  }
		public string   ZZLookup    { get { return _WebLookup.Text; } set { _WebLookup.Text = value; }  }
		public Wxf      ZZWxf       { get { return _Wxf;            } set { _Wxf            = value; }  }
		public WebPanels ZZPanels   { get { return objWebPanels;    } set { objWebPanels    = value; }  }
		public WebCells CellsPanel  { get { return _WebCells;       } set { _WebCells       = value; }  }
		public XStatus  STATUS_DATA { get { return _STATUS_DATA;    } set { _STATUS_DATA    = value; }  }

		public string  DbName             { get { return _DbName;             } set { _DbName             = value; }  }
		public string  ZZLOGON_SSD        { get { return _ZZLOGON_SSD;        } set { _ZZLOGON_SSD        = value; }  }
		public string  ZZLOGON_ID         { get { return _ZZLOGON_ID;         } set { _ZZLOGON_ID         = value; }  }
		public string  ZZEventOpts        { get { return _ZZEventOpts;        } set { _ZZEventOpts        = value; }  }
		public string  ZZVIEW_MODE_CODE   { get { return _ZZVIEW_MODE_CODE;   } set { _ZZVIEW_MODE_CODE   = value; }  }
		public string  ZZVIEW_STATUS_CODE { get { return _ZZVIEW_STATUS_CODE; } set { _ZZVIEW_STATUS_CODE = value; }  }
		public string  ZZMODEL_DATA       { get { return _ZZMODEL_DATA;       } set { _ZZMODEL_DATA       = value; }  }
		public string  ZZEventStatus      { get { return _ZZEventStatus;      } set { _ZZEventStatus      = value; }  }
		public string  ZZEventMode        { get { return _ZZEventMode;        } set { _ZZEventMode        = value; }  }
		public string  ZZEventArgs        { get { return _ZZEventArgs;        } set { _ZZEventArgs        = value; }  }
		public string  ZZLOGON_LANG       { get { return _ZZLOGON_LANG;       } set { _ZZLOGON_LANG       = value; }  }
		public string  ATVT_CODE          { get { return _ATVT_CODE;          } set { _ATVT_CODE          = value; }  }
		public string  DATA_STATUS_CODE   { get { return _DATA_STATUS_CODE;   } set { _DATA_STATUS_CODE   = value; }  }
		public string  APP_PATH           { get { return _APP_PATH;           } set { _APP_PATH           = value; }  }

		public StreamContext  Trans              { get { return _Trans;           } set { _Trans           = value; }  }

#region screen element

					private WebTextBox objVARIABLE_ODTP_CODE =new WebTextBox();
    private WebBrowser objVARIABLE_ODTP_CODEBrw =new WebBrowser();

					private WebTextBox objVORDTLM_VO_NO =new WebTextBox();
    private WebBrowser objVORDTLM_VO_NOBrw =new WebBrowser();

					private WebTextBox objVORDTLM_VO_DT =new WebTextBox();

					private WebTextBox objVARIABLE_ODTP_STATUS =new WebTextBox();

					private WebDateBox objVARIABLE_VO_DATE =new WebDateBox();

					private WebTextBox objVARIABLE_COMP_CODE =new WebTextBox();

					private WebCheckBox objVARIABLE_REVERSE_BIT =new WebCheckBox();

					private WebTextBox objVARIABLE_REFX_NO =new WebTextBox();

					private WebTextBox objVORDTLM_ACC_CODE =new WebTextBox();
    private WebBrowser objVORDTLM_ACC_CODEBrw =new WebBrowser();

					private WebTextBox objVARIABLE_ACC_NAME01 =new WebTextBox();

					private WebTextBox objVORDTLM_CCY_CODE =new WebTextBox();
    private WebBrowser objVORDTLM_CCY_CODEBrw =new WebBrowser();

					private WebFloatBox objVORDTLM_XCHG_RATE =new WebFloatBox();

					private WebDigitBox objVORDTLM_SERIAL_NO =new WebDigitBox();

					private WebTextBox objVORDTLM_SIGN_CODE =new WebTextBox();

					private WebFloatBox objVARIABLE_VO_CCY_AMT =new WebFloatBox();

					private WebFloatBox objVARIABLE_VO_DET_AMT =new WebFloatBox();

					private WebTextBox objVORDTLM_VO_DOC_NAME01 =new WebTextBox();

					private WebMemoBox objVORDTLM_VO_RMKS =new WebMemoBox();

					private WebFloatBox objVORDTLM_REQ_QTY =new WebFloatBox();

					private WebTextBox objVORDTLM_UOM_CODE =new WebTextBox();
    private WebBrowser objVORDTLM_UOM_CODEBrw =new WebBrowser();

					private WebTextBox objVORDTLM_DOC_NO =new WebTextBox();

					private WebTextBox objVORDTLM_DOC_TP_CODE =new WebTextBox();

					private WebTextBox objVORDTLM_PAY_CODE =new WebTextBox();
    private WebBrowser objVORDTLM_PAY_CODEBrw =new WebBrowser();

					private WebTextBox objVORDTLM_DOC_REF_NO =new WebTextBox();

					private WebDateBox objVORDTLM_DOC_REQ_DATE =new WebDateBox();

					private WebDateBox objVORDTLM_DOC_DUE_DATE =new WebDateBox();

					private WebFloatBox objVORDTLM_VO_DR_DET_AMT =new WebFloatBox();

					private WebFloatBox objVORDTLM_VO_DR_CCY_AMT =new WebFloatBox();

					private WebFloatBox objVORDTLM_VO_CR_DET_AMT =new WebFloatBox();

					private WebFloatBox objVORDTLM_VO_CR_CCY_AMT =new WebFloatBox();

					private WebFloatBox objVARIABLE_DR_DET_AMT =new WebFloatBox();

					private WebFloatBox objVARIABLE_CR_DET_AMT =new WebFloatBox();

					private WebFloatBox objVARIABLE_DIFF_DET_AMT =new WebFloatBox();

#endregion
		const  string ZFILE_NAME   ="UID02204BV";
		const  string MUKI_EDITION ="MIN";

	}
}
